<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>页码</title>
</head>
<body>
<div style="text-align: center;" th:fragment="paginationPage">
    <div>
        <ul id="pagination" class="pagination"></ul>
        <!--<div style="display: inline; padding-bottom: 100px;">
            <select>
                <option value='5'>5条/页</option>
                <option value='10'>10条/页</option>
                <option value='20'>20条/页</option>
            </select>
            跳至<input type='text' id='pageNum' style='width: 30px;' value='${pageInfo.pageNum}' >页
        </div>-->
    </div>
    <script th:inline="javascript">
        //分页
        $(function(){
              var tPages=[[${page.pages}]] ||1;
              var start = [[${page.current}]] || 1;
            $("#pagination").twbsPagination({
                totalPages: tPages,
                startPage:  start,
                visiblePages:5,
                first:"首页",
                prev:"上页",
                next:"下页",
                last:"尾页",
                initiateStartPageClick:false,
                onPageClick:function(event,page){
                     $("#currentPage").val(page);
                     $("#searchForm").submit();
            }
        });
        })
    </script>
</div>
</body>
</html>